package demo1;

//局部内部类
class OuterClass3 {
    public void func() {
        class InnerClass {
            public int a = 1;

            public void test() {
                System.out.println("hello!");
            }
        }
        InnerClass innerClass = new InnerClass();
        innerClass.test();
    }
}
public class Test3 {
    public static void main(String[] args) {
        OuterClass3 outerClass3 = new OuterClass3();
        outerClass3.func();
    }
}
